unit ufTask_Property_ActionRunIntForm;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, ufTask_Property_ActionCustom, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.Grids, Vcl.ValEdit,
  ufTask_Property_ActionValuesEditor, uTasks;

type
  TfTask_Property_ActionRunIntForm = class(TTfTask_Property_ActionCustom)
    OpenDialog: TOpenDialog;
    lExtFormFileName: TLabel;
    fValuesEditor: TfTask_Property_ActionValuesEditor;
    eModuleName: TEdit;
  private
  public
    procedure Prepare(AStep: TStep); override;
    procedure Save; override;
    procedure Check; override;
  end;

var
  fTask_Property_ActionRunIntForm: TfTask_Property_ActionRunIntForm;

implementation

{$R *.dfm}

uses
  u1cAgentServerConst;

{ TfTask_Property_ActionRunIntForm }

procedure TfTask_Property_ActionRunIntForm.Check;
begin
  eModuleName.Text:= Trim(eModuleName.Text);
  if eModuleName.Text='' then begin
    eModuleName.SetFocus;
    raise Exception.Create(sSRV_41);
  end;
end;

procedure TfTask_Property_ActionRunIntForm.Prepare(AStep: TStep);
begin
  inherited;
  eModuleName.Text:= AStep.IntModuleName;
  fValuesEditor.Prepare(AStep.IntValues);
end;

procedure TfTask_Property_ActionRunIntForm.Save;
begin
  FStep.IntModuleName:= eModuleName.Text;
  fValuesEditor.Save;
end;

end.
